package aom.ju.ss.mode

import android.os.Parcel
import android.os.Parcelable


data class ClassMode(
    var code: Int,
    var `data`: List<ClassModeDataOne>?,
    var status: Int
)


data class ClassModeDataOne(
    var title: String,
    var image: String,
    var child: List<ClassModeDataTwo>?,
    var id: String,
    var pid: String,
    var tjgd: String,

    var ck: Boolean = false,
    var ckline: Boolean = false,
)

data class ClassModeDataTwo(
    var title: String,
    var image: String,
    var child: List<ClassModeDataInfoThree>?,
    var id: String,
    var pid: String,
    var tjgd: String
)

  class ClassModeDataInfoThree(
    var title: String,
    var image: String,
    var id: String,

    var idtwo: String,

    var idone: String,
    var pid: String,
    var tjgd: String,
    var rootpid: String,
    var ck: Boolean = false
): Parcelable {
      constructor(parcel: Parcel) : this(
          parcel.readString()!!,
          parcel.readString()!!,
          parcel.readString()!!,
          parcel.readString()!!,
          parcel.readString()!!,
          parcel.readString()!!,
          parcel.readString()!!,
          parcel.readString()!!,
          parcel.readByte() != 0.toByte()
      ) {
      }

      override fun writeToParcel(parcel: Parcel, flags: Int) {
          parcel.writeString(title)
          parcel.writeString(image)
          parcel.writeString(id)
          parcel.writeString(idtwo)
          parcel.writeString(idone)
          parcel.writeString(pid)
          parcel.writeString(tjgd)
          parcel.writeString(rootpid)
          parcel.writeByte(if (ck) 1 else 0)
      }

      override fun describeContents(): Int {
          return 0
      }

      companion object CREATOR : Parcelable.Creator<ClassModeDataInfoThree> {
          override fun createFromParcel(parcel: Parcel): ClassModeDataInfoThree {
              return ClassModeDataInfoThree(parcel)
          }

          override fun newArray(size: Int): Array<ClassModeDataInfoThree?> {
              return arrayOfNulls(size)
          }
      }


  }
